Remove a (now) misleading comment.
authorMatthias Clasen <matthiasc@src.gnome.org>
Tue, 5 Feb 2002 22:50:31 +0000 (22:50 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Tue, 5 Feb 2002 22:50:31 +0000 (22:50 +0000)
* gtk/gtkrc.c (gtk_rc_parse_file): Remove a (now) misleading comment.

* gtk/tmpl/gtkrc.sgml: Update the description of RC file loading
to match recent code changes. Also document font_name and engine.

ChangeLog
ChangeLog.pre-2-0
ChangeLog.pre-2-10
ChangeLog.pre-2-2
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
docs/reference/ChangeLog
docs/reference/gtk/tmpl/gtkrc.sgml
gtk/gtkrc.c

index 91bb2e4ca5dc169287152a0110212a0ad5203b2a..07036b53e943e579185d016bc0ce60d1ebf0ffdd 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2002-02-05  Matthias Clasen  <matthiasc@poet.de>
+
+       * gtk/gtkrc.c (gtk_rc_parse_file): Remove a (now) misleading comment.
+
 2002-02-05  Federico Mena Quintero  <federico@ximian.com>
 
        * gdk/gdkwindow.h: Do not #include <gdk/gdkwindow.h>.
index 91bb2e4ca5dc169287152a0110212a0ad5203b2a..07036b53e943e579185d016bc0ce60d1ebf0ffdd 100644 (file)
@@ -1,3 +1,7 @@
+2002-02-05  Matthias Clasen  <matthiasc@poet.de>
+
+       * gtk/gtkrc.c (gtk_rc_parse_file): Remove a (now) misleading comment.
+
 2002-02-05  Federico Mena Quintero  <federico@ximian.com>
 
        * gdk/gdkwindow.h: Do not #include <gdk/gdkwindow.h>.
index 91bb2e4ca5dc169287152a0110212a0ad5203b2a..07036b53e943e579185d016bc0ce60d1ebf0ffdd 100644 (file)
@@ -1,3 +1,7 @@
+2002-02-05  Matthias Clasen  <matthiasc@poet.de>
+
+       * gtk/gtkrc.c (gtk_rc_parse_file): Remove a (now) misleading comment.
+
 2002-02-05  Federico Mena Quintero  <federico@ximian.com>
 
        * gdk/gdkwindow.h: Do not #include <gdk/gdkwindow.h>.
index 91bb2e4ca5dc169287152a0110212a0ad5203b2a..07036b53e943e579185d016bc0ce60d1ebf0ffdd 100644 (file)
@@ -1,3 +1,7 @@
+2002-02-05  Matthias Clasen  <matthiasc@poet.de>
+
+       * gtk/gtkrc.c (gtk_rc_parse_file): Remove a (now) misleading comment.
+
 2002-02-05  Federico Mena Quintero  <federico@ximian.com>
 
        * gdk/gdkwindow.h: Do not #include <gdk/gdkwindow.h>.
index 91bb2e4ca5dc169287152a0110212a0ad5203b2a..07036b53e943e579185d016bc0ce60d1ebf0ffdd 100644 (file)
@@ -1,3 +1,7 @@
+2002-02-05  Matthias Clasen  <matthiasc@poet.de>
+
+       * gtk/gtkrc.c (gtk_rc_parse_file): Remove a (now) misleading comment.
+
 2002-02-05  Federico Mena Quintero  <federico@ximian.com>
 
        * gdk/gdkwindow.h: Do not #include <gdk/gdkwindow.h>.
index 91bb2e4ca5dc169287152a0110212a0ad5203b2a..07036b53e943e579185d016bc0ce60d1ebf0ffdd 100644 (file)
@@ -1,3 +1,7 @@
+2002-02-05  Matthias Clasen  <matthiasc@poet.de>
+
+       * gtk/gtkrc.c (gtk_rc_parse_file): Remove a (now) misleading comment.
+
 2002-02-05  Federico Mena Quintero  <federico@ximian.com>
 
        * gdk/gdkwindow.h: Do not #include <gdk/gdkwindow.h>.
index 91bb2e4ca5dc169287152a0110212a0ad5203b2a..07036b53e943e579185d016bc0ce60d1ebf0ffdd 100644 (file)
@@ -1,3 +1,7 @@
+2002-02-05  Matthias Clasen  <matthiasc@poet.de>
+
+       * gtk/gtkrc.c (gtk_rc_parse_file): Remove a (now) misleading comment.
+
 2002-02-05  Federico Mena Quintero  <federico@ximian.com>
 
        * gdk/gdkwindow.h: Do not #include <gdk/gdkwindow.h>.
index c875badab723d79ff62b76755a2c6abc5c831b68..34f211eb180f6a880381471bbccd0b789c509ec1 100644 (file)
@@ -1,3 +1,8 @@
+2002-02-05  Matthias Clasen  <matthias@local>
+
+       * gtk/tmpl/gtkrc.sgml: Update the description of RC file loading
+       to match recent code changes. Also document font_name and engine. 
+
 Tue Jan 29 23:41:31 2002  Owen Taylor  <otaylor@redhat.com>
 
        * gtk/Makefile.am (content_files): Add x11.sgml.
index 76c14a8cada56799229438f860174165134627af..58596be8332025a793d2473d55aadafc3045e488 100644 (file)
@@ -33,16 +33,13 @@ Additionally, the <envar>GTK_RC_FILES</envar> environment variable
 can be set to a #G_SEARCHPATH_SEPARATOR_S-separated list of files
 in order to overwrite the set of default files at runtime.
 </para>
-<para>
-For each default file, in addition to the file itself,
-GTK+ will look for a locale-specific file that will
-be parsed before the main file. For instance,
-if <envar>LANG</envar> is set to <literal>ja_JP.ujis</literal>,
-when loading the default file <filename>~/.gtkrc</filename>
-then GTK+ looks for <filename>~/.gtkrc.ja_JP.ujis</filename>,
-<filename>~/.gtkrc.ja_JP</filename>, and
-<filename>~/.gtkrc.ja</filename>, and parses all files that 
-it finds.
+<para><anchor id="locale-specific-rc">
+For each RC file, in addition to the file itself, GTK+ will look for 
+a locale-specific file that will be parsed after the main file. 
+For instance, if <envar>LANG</envar> is set to <literal>ja_JP.ujis</literal>,
+when loading the default file <filename>~/.gtkrc</filename> then GTK+ looks 
+for <filename>~/.gtkrc.ja_JP</filename> and <filename>~/.gtkrc.ja</filename>, 
+and parses the first of those that exists.
 </para>
 </refsect2>
 
@@ -130,7 +127,14 @@ The possible toplevel declarations are:
   <varlistentry>
     <term><literal>include <replaceable>filename</replaceable></literal></term>
     <listitem>
-      <para>Parses another file at this point.</para>
+      <para>Parses another file at this point. If
+        <replaceable>filename</replaceable> is not an absolute filename, 
+        it is searched in the directories of the currently open RC files.
+      </para>
+      <para>GTK+ also tries to load a 
+        <link linkend="locale-specific-rc">locale-specific variant</link> of
+        the included file.
+       </para>
     </listitem>
   </varlistentry>
   <varlistentry>
@@ -254,7 +258,9 @@ elements are:
     <term><literal>font = <replaceable>font</replaceable></literal></term>
      <listitem>
        <para>
-         Sets the font for a widget.
+         Sets the font for a widget. <replaceable>font</replaceable> must be
+         a XLFD font description, e.g. 
+         <literal>"-*-helvetica-medium-r-normal--10-*-*-*-*-*-*-*"</literal>.
        </para>
      </listitem>
   </varlistentry>
@@ -263,10 +269,26 @@ elements are:
      <listitem>
        <para>
          Sets the fontset for a widget. Overrides any
-         <literal>font</literal> declarations.
+         <literal>font</literal> declarations. <replaceable>font</replaceable> 
+         must be a comma-separated list of XLFD font descriptions, e.g.
+         <literal>"-JIS-Fixed-Medium-R-Normal--26-180-100-100-C-240,
+                   -JIS-Fixed-Medium-R-Normal--26-180-100-100-C-120,
+                   -GB-Fixed-Medium-R-Normal--26-180-100-100-C-240,
+                   -Adobe-Courier-Bold-R-Normal--25-180-100-100-M-150"</literal>.
        </para>
      </listitem>
   </varlistentry>
+  <varlistentry>
+    <term><literal>font_name = <replaceable>font</replaceable></literal></term>
+     <listitem>
+       <para>
+         Sets the font for a widget. Overrides any
+         <literal>font</literal> or <literal>fontset</literal> declarations. 
+         <replaceable>font</replaceable> must be a Pango font name, e.g.
+         <literal>"Sans Italic 10"</literal>.
+       </para>
+     </listitem>   
+  </varlistentry>
   <varlistentry>
     <term><literal>stock[<replaceable>"stock-id"</replaceable>] = { <replaceable>icon source specifications</replaceable> }</literal></term>
      <listitem>
@@ -275,6 +297,15 @@ elements are:
        </para>
      </listitem>
   </varlistentry>
+  <varlistentry>
+    <term><literal>engine <replaceable>"engine"</replaceable> { <replaceable>engine-specific
+settings</replaceable> }</literal></term>
+     <listitem>
+       <para>
+        Defines the engine to be used when drawing with this style.
+       </para>
+     </listitem>
+  </varlistentry>
 </variablelist>
 </para>
 <para>
@@ -336,7 +367,7 @@ state of the widget. The states are:
 </variablelist>
 </para>
 
-<para id="color-format">
+<para><anchor id="color-format">
 Colors can be specified as a string containing a color name (GTK+ knows
 all names from the X color database 
 <filename>/usr/lib/X11/rgb.txt</filename>),  
@@ -656,7 +687,8 @@ statement in a RC file.
 Parses a given resource file.
 </para>
 
-@filename: the filename of a file to parse.
+@filename: the filename of a file to parse. If @filename is not absolute, it
+  is searched in the current directory.
 
 
 <!-- ##### FUNCTION gtk_rc_parse_string ##### -->
index dabbfa041f849ca9a2052b3c2eb1860397ed2ece..b9a2fe7b91707af23d03dd0f2b22d74790ce3e52 100644 (file)
@@ -456,7 +456,8 @@ gtk_rc_add_initial_default_files (void)
 
 /**
  * gtk_rc_add_default_file:
- * @filename: the pathname to the file.
+ * @filename: the pathname to the file. If @filename is not absolute, it
+ *    is searched in the current directory.
  * 
  * Adds a file to the list of files to be parsed at the
  * end of gtk_init().
@@ -808,11 +809,7 @@ gtk_rc_parse_file (GtkRcContext *context,
 
   if (strcmp (locale, "C") && strcmp (locale, "POSIX"))
     {
-      /* Determine locale-specific suffixes for RC files
-       *
-       * We normalize the charset into a standard form,
-       * which has all '-' and '_' characters removed,
-       * and is lowercase.
+      /* Determine locale-specific suffixes for RC files.
        */
       length = strlen (locale);